﻿CREATE PROCEDURE [acms].[Post_GetTopLevelByMenuIdAndSiteId]
		@SiteId int,
		@MenuId varchar(20)
AS
	SELECT *
	FROM [Post_View]
	WHERE SiteId = @SiteId
		and ParentId is null
		and Id in (Select PostId From [PostMenu] Where MenuId = @MenuId and Included = 1)
	ORDER By Sequence
RETURN 0;